﻿using Application.Roles.Interfaces.Repositories;
using MediatR;

namespace Application.Roles.Commands.RoleWrite
{
    public class RoleWriteCommandHandle(IRoleWriteRepository roleWrite) : IRequestHandler<RoleWriteCommand, Guid?>
    {
        public async Task<Guid?> Handle(RoleWriteCommand request, CancellationToken cancellationToken)
        {
            return await roleWrite.AddAsync(request, cancellationToken);
        }
    }
}
